<?php
/**
 * 这是SplFileInfo类的一个示例，它可以返回文件信息
 * User: ford
 * Date: 15-6-19
 * Time: 下午10:14
 */
$fileInfo = new SplFileInfo('/home/ford/.bashrc');
echo 'Basename:' . $fileInfo->getBasename() . "\n";
echo "change Time:" . strftime("%m-%d-%Y %T", $fileInfo->getCTime()) . "\n";
echo "Owner UID:" . $fileInfo->getOwner() . "\n";
echo "Size:" . $fileInfo->getSize() . "\n";
echo "Directory:" . $fileInfo->isDir() ? 'No' : 'Yes';
echo "\n";

